package com.hnkywl.sts.entity.djgl;

import com.hnkywl.sts.entity.BaseEntity;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：交易系统向运营系统推送的交易订单
 * 包:        com.hnkywl.sts.entity.djgl
 * 类描述:    交易订单
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_BIZ_JYDD")
@Where(clause = "deleted!='1'")
public class Jydd extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqJydd", allocationSize = 1, sequenceName = "SEQ_BIZ_JYDD")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqJydd")
    private Long id;
    /**
     * 订单(合同)ID
     */
    private String order_id;
    /**
     * 取推送资源接口时，与其同名的值,
     * 2:仓储过来的资源,3表示国贸过来的资源
     */
    private String guomao_resource_from;
    /**
     * 销售品种代码
     */
    private String sellType;
    /**
     * 当前操作订单下发人
     */
    private String operator;
    /**
     * 订单(合同)编号
     */
    private String order_sn;
    /**
     * 卖家交易系统登陆名
     */
    private String memberCode;
    /**
     * 卖家（专场）名称
     */
    private String seller_name;
    /**
     * 买家在交易系统的ID
     */
    private String buyer_id;
    /**
     * 买家在交易系统的登陆名
     */
    private String buyer_name;
    /**
     * 买家邮箱
     */
    private String buyer_email;
    /**
     * 买家账户
     */
    private String buyer_account;
    /**
     * 包子项
     */
    private String package_SubItem;
    /**
     * 订单状态,其中这里显示竞价包的状态，是流包或其它
     */
    private String status;
    /**
     * 订单创建时间
     */
    private String add_time;
    /**
     * 订单支付方式的名称
     */
    private String payment_name;
    /**
     * 订单支付代码
     */
    private String payment_code;
    /**
     * 订单支付银行
     */
    private String payment_bankof;
    /**
     * 订单支付SN
     */
    private String out_trade_sn;
    /**
     * 订单支付时间
     */
    private String pay_time;
    /**
     * 订单支付备注
     */
    private String pay_message;
    /**
     * 订单物流时间
     */
    private String ship_time;
    /**
     * 订单物流公司
     */
    private String express_company;
    /**
     * 订单结束时间
     */
    private String finished_time;
    /**
     * 订单总金额
     */
    private String goods_amount;
    /**
     * 订单折扣
     */
    private String discount;
    /**
     * 订单过期时间
     */
    private String expire_time;
    /**
     * 订单取消类型
     */
    private String canceled_type;
    /**
     * 订单支付类型
     */
    private String payment_type;
    /**
     * 订单物流类型
     */
    private String shipped_type;
    /**
     * 订单支付银行
     */
    private String payment_bank;
    /**
     * 此处无实际业务意义，请忽略，但保留此字段
     */
    private String release_cargo_num;
    /**
     * 订单发票
     */
    private String press_invoice;
    /**
     *
     */
    private String notice_invoice;
    /**
     * 支付订单状态
     */
    private String pay_order_status;
    /**
     * 订单支付ID
     */
    private String payment_id;
    /**
     * 是否使用余额
     */
    private String is_use_balance;
    /**
     * 如果使用余额，所需要的资金
     */
    private String amount_of_balance;
    /**
     * 是否在线支付
     */
    private String is_online_payment;
    /**
     * 商品信息
     */
    @OneToMany(fetch = FetchType.LAZY, targetEntity = Goodses.class)
    @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
    @JoinColumn(name = "JYDD_ID")
    private List<Goodses> goodses;
    /**
     * 订单类型
     */
    private String order_type;

    /**
     * 0:挂牌，1;竞价
     */
    private String isCompetiveResource;

    /**
     * 0:现货交易，1:赎货交易
     */
    private String dingdan_type;

    /**
     * "mid":居中结算订单，"normal":普通订单
     */
    private String extension;

    /**
     * 物资来源，0:excel上传， 1:销售系统推送 ，2:仓储同步  3:供应链物流推送
     */
    private String stander_from;

    public String getStander_from() {
        return stander_from;
    }

    public void setStander_from(String stander_from) {
        this.stander_from = stander_from;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getDingdan_type() {
        return dingdan_type;
    }

    public void setDingdan_type(String dingdan_type) {
        this.dingdan_type = dingdan_type;
    }

    public String getIsCompetiveResource() {
        return isCompetiveResource;
    }

    public void setIsCompetiveResource(String isCompetiveResource) {
        this.isCompetiveResource = isCompetiveResource;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }

    public String getGuomao_resource_from() {
        return guomao_resource_from;
    }

    public void setGuomao_resource_from(String guomao_resource_from) {
        this.guomao_resource_from = guomao_resource_from;
    }

    public String getSellType() {
        return sellType;
    }

    public void setSellType(String sellType) {
        this.sellType = sellType;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getMemberCode() {
        return memberCode;
    }

    public void setMemberCode(String memberCode) {
        this.memberCode = memberCode;
    }

    public String getSeller_name() {
        return seller_name;
    }

    public void setSeller_name(String seller_name) {
        this.seller_name = seller_name;
    }

    public String getBuyer_id() {
        return buyer_id;
    }

    public void setBuyer_id(String buyer_id) {
        this.buyer_id = buyer_id;
    }

    public String getBuyer_name() {
        return buyer_name;
    }

    public void setBuyer_name(String buyer_name) {
        this.buyer_name = buyer_name;
    }

    public String getBuyer_email() {
        return buyer_email;
    }

    public void setBuyer_email(String buyer_email) {
        this.buyer_email = buyer_email;
    }

    public String getBuyer_account() {
        return buyer_account;
    }

    public void setBuyer_account(String buyer_account) {
        this.buyer_account = buyer_account;
    }

    public String getPackage_SubItem() {
        return package_SubItem;
    }

    public void setPackage_SubItem(String package_SubItem) {
        this.package_SubItem = package_SubItem;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getAdd_time() {
        return add_time;
    }

    public void setAdd_time(String add_time) {
        this.add_time = add_time;
    }

    public String getPayment_name() {
        return payment_name;
    }

    public void setPayment_name(String payment_name) {
        this.payment_name = payment_name;
    }

    public String getPayment_code() {
        return payment_code;
    }

    public void setPayment_code(String payment_code) {
        this.payment_code = payment_code;
    }

    public String getPayment_bankof() {
        return payment_bankof;
    }

    public void setPayment_bankof(String payment_bankof) {
        this.payment_bankof = payment_bankof;
    }

    public String getOut_trade_sn() {
        return out_trade_sn;
    }

    public void setOut_trade_sn(String out_trade_sn) {
        this.out_trade_sn = out_trade_sn;
    }

    public String getPay_time() {
        return pay_time;
    }

    public void setPay_time(String pay_time) {
        this.pay_time = pay_time;
    }

    public String getPay_message() {
        return pay_message;
    }

    public void setPay_message(String pay_message) {
        this.pay_message = pay_message;
    }

    public String getShip_time() {
        return ship_time;
    }

    public void setShip_time(String ship_time) {
        this.ship_time = ship_time;
    }

    public String getExpress_company() {
        return express_company;
    }

    public void setExpress_company(String express_company) {
        this.express_company = express_company;
    }

    public String getFinished_time() {
        return finished_time;
    }

    public void setFinished_time(String finished_time) {
        this.finished_time = finished_time;
    }

    public String getGoods_amount() {
        return goods_amount;
    }

    public void setGoods_amount(String goods_amount) {
        this.goods_amount = goods_amount;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public String getExpire_time() {
        return expire_time;
    }

    public void setExpire_time(String expire_time) {
        this.expire_time = expire_time;
    }

    public String getCanceled_type() {
        return canceled_type;
    }

    public void setCanceled_type(String canceled_type) {
        this.canceled_type = canceled_type;
    }

    public String getPayment_type() {
        return payment_type;
    }

    public void setPayment_type(String payment_type) {
        this.payment_type = payment_type;
    }

    public String getShipped_type() {
        return shipped_type;
    }

    public void setShipped_type(String shipped_type) {
        this.shipped_type = shipped_type;
    }

    public String getPayment_bank() {
        return payment_bank;
    }

    public void setPayment_bank(String payment_bank) {
        this.payment_bank = payment_bank;
    }

    public String getRelease_cargo_num() {
        return release_cargo_num;
    }

    public void setRelease_cargo_num(String release_cargo_num) {
        this.release_cargo_num = release_cargo_num;
    }

    public String getPress_invoice() {
        return press_invoice;
    }

    public void setPress_invoice(String press_invoice) {
        this.press_invoice = press_invoice;
    }

    public String getNotice_invoice() {
        return notice_invoice;
    }

    public void setNotice_invoice(String notice_invoice) {
        this.notice_invoice = notice_invoice;
    }

    public String getPay_order_status() {
        return pay_order_status;
    }

    public void setPay_order_status(String pay_order_status) {
        this.pay_order_status = pay_order_status;
    }

    public String getPayment_id() {
        return payment_id;
    }

    public void setPayment_id(String payment_id) {
        this.payment_id = payment_id;
    }

    public String getIs_use_balance() {
        return is_use_balance;
    }

    public void setIs_use_balance(String is_use_balance) {
        this.is_use_balance = is_use_balance;
    }

    public String getAmount_of_balance() {
        return amount_of_balance;
    }

    public void setAmount_of_balance(String amount_of_balance) {
        this.amount_of_balance = amount_of_balance;
    }

    public String getIs_online_payment() {
        return is_online_payment;
    }

    public void setIs_online_payment(String is_online_payment) {
        this.is_online_payment = is_online_payment;
    }

    public List<Goodses> getGoodses() {
        return goodses;
    }

    public void setGoodses(List<Goodses> goodses) {
        this.goodses = goodses;
    }

    public String getOrder_type() {
        return order_type;
    }

    public void setOrder_type(String order_type) {
        this.order_type = order_type;
    }

//    public Invoice getInvoice() {
//        return invoice;
//    }
//
//    public void setInvoice(Invoice invoice) {
//        this.invoice = invoice;
//    }

    public String getOrder_sn() {
        return order_sn;
    }

    public void setOrder_sn(String order_sn) {
        this.order_sn = order_sn;
    }
}

